package com.inst.jsoup_html_demo.fragment.topicfragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.inst.jsoup_html_demo.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;


/**
 *
 */
public class JingHuaFragment extends Fragment {

    Unbinder unbinder;
    @BindView(R.id.jinghua_tab_content_text)
    TextView mTabContentText;
    private String mFrom;

    public static JingHuaFragment newInstance(String from) {
        JingHuaFragment fragment = new JingHuaFragment();
        Bundle bundle = new Bundle();
        bundle.putString("from", from);
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mFrom = getArguments().getString("from");
        }
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_huati_tab_jinghua, null);
        unbinder = ButterKnife.bind(this, view);
        Log.e("oncreateView","精华");
        mTabContentText.setText("精华");
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
